#ifndef DLGSERVERCONTEST_H_
#define DLGSERVERCONTEST_H_

#include "scHeader.h"
#include <QSslError>
#include <QDialog>
#include "ui_dlgServerConTest.h"

namespace sybilpm
{

class DlgServerConTest : public QDialog
{
	Q_OBJECT
	enum ObjectState
	{
		CT_SETUP=0,
		CT_HEAD,
		CT_FAILED,
		CT_SUCCESS
	};
public:
	DlgServerConTest(SrvConnection & server, bool autoClose, QWidget *parent = 0);
	~DlgServerConTest();

private:
	void updateStatus();
	Ui::dlgServerConTest ui;
	ObjectState state;
	bool ac;
	QTimer *timer;
	SrvConnection & srv;
	int transId;
	QString httpStatusText, details;
private slots:
	void timerTic();
	void testReadySl(bool success, unsigned long transId);
	void updateActionSl(QString action);
	void updateHttpStatusSl(QString httpStatus);
	void updateProgressSl(int current, int total);
	void detailsSl();
};

} // namespace sybilpm

#endif /*DLGSERVERCONTEST_H_*/
